home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / texinfo / info / info.h < prev    next >
C/C++ Source or Header  |  1994-01-28  |  4KB  |  97 lines

  1. /* info.h -- Header file which includes all of the other headers. */
  2.  
  3. /* This file is part of GNU Info, a program for reading online documentation
  4.    stored in Info format.
  5.  
  6.    Copyright (C) 1993 Free Software Foundation, Inc.
  7.  
  8.    This program is free software; you can redistribute it and/or modify
  9.    it under the terms of the GNU General Public License as published by
  10.    the Free Software Foundation; either version 2, or (at your option)
  11.    any later version.
  12.  
  13.    This program is distributed in the hope that it will be useful,
  14.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16.    GNU General Public License for more details.
  17.  
  18.    You should have received a copy of the GNU General Public License
  19.    along with this program; if not, write to the Free Software
  20.    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21.  
  22.    Written by Brian Fox (bfox@ai.mit.edu). */
  23.  
  24. #if !defined (_INFO_H_)
  25. #define _INFO_H_
  26.  
  27. #include <stdio.h>
  28. #include <ctype.h>
  29. #include <sys/types.h>
  30. #include <sys/stat.h>
  31. #include "filesys.h"
  32. #include "display.h"
  33. #include "session.h"
  34. #include "echo_area.h"
  35. #include "doc.h"
  36. #include "footnotes.h"
  37. #include "gc.h"
  38.  
  39. /* A structure associating the nodes visited in a particular window. */
  40. typedef struct {
  41.   WINDOW *window;        /* The window that this list is attached to. */
  42.   NODE **nodes;            /* Array of nodes visited in this window. */
  43.   int *pagetops;        /* For each node in NODES, the pagetop. */
  44.   long *points;            /* For each node in NODES, the point. */
  45.   int current;            /* Index in NODES of the current node. */
  46.   int nodes_index;        /* Index where to add the next node. */
  47.   int nodes_slots;        /* Number of slots allocated to NODES. */
  48. } INFO_WINDOW;
  49.  
  50. /* Array of structures describing for each window which nodes have been
  51.    visited in that window. */
  52. extern INFO_WINDOW **info_windows;
  53.  
  54. /* For handling errors.  If you initialize the window system, you should
  55.    also set info_windows_initialized_p to non-zero.  It is used by the
  56.    info_error () function to determine how to format and output errors. */
  57. extern int info_windows_initialized_p;
  58.  
  59. /* Non-zero if an error message has been printed. */
  60. extern int info_error_was_printed;
  61.  
  62. /* Non-zero means ring terminal bell on errors. */
  63. extern int info_error_rings_bell_p;
  64.  
  65. /* Print FORMAT with ARG1 and ARG2.  If the window system was initialized,
  66.    then the message is printed in the echo area.  Otherwise, a message is
  67.    output to stderr. */
  68. extern void info_error ();
  69.  
  70. /* The version numbers of Info. */
  71. extern int info_major_version, info_minor_version, info_patch_level;
  72.  
  73. /* How to get the version string for this version of Info.  Returns
  74.    something similar to "2.9". */
  75. extern char *version_string ();
  76.  
  77. /* Error message defines. */
  78. #define CANT_FIND_NODE    "Cannot find the node \"%s\"."
  79. #define CANT_FILE_NODE    "Cannot find the node \"(%s)%s\"."
  80. #define CANT_FIND_WIND    "Cannot find a window!"
  81. #define CANT_FIND_POINT    "Point doesn't appear within this window's node!"
  82. #define CANT_KILL_LAST    "Cannot delete the last window."
  83. #define NO_MENU_NODE    "No menu in this node."
  84. #define NO_FOOT_NODE    "No footnotes in this node."
  85. #define NO_XREF_NODE    "No cross references in this node."
  86. #define NO_POINTER    "No \"%s\" pointer for this node."
  87. #define UNKNOWN_COMMAND    "Unknown Info command `%c'.  `?' for help."
  88. #define TERM_TOO_DUMB    "Terminal type \"%s\" is not smart enough to run Info."
  89. #define AT_NODE_BOTTOM    "You are already at the last page of this node."
  90. #define AT_NODE_TOP    "You are already at the first page of this node."
  91. #define ONE_WINDOW    "Only one window."
  92. #define WIN_TOO_SMALL    "Resulting window would be too small."
  93. #define CANT_MAKE_HELP    \
  94. "There isn't enough room to make a help window.  Please delete a window."
  95.  
  96. #endif /* !_INFO_H_ */
  97.